{
    // class User{
    //     name: string = 'abc'
    //     constructor(name: string){
    //         this.name = name;
    //     }
    // }
    // 简写,加上修饰符
    // class User{
    //     constructor(public name: string){}
    // }
    var User = /** @class */ (function () {
        function User(name) {
            this.name = name;
            this.name = this.initName(name); //constructor中也可以调用方法
        }
        User.prototype.initName = function (name) {
            return name;
        };
        return User;
    }());
    var user = new User('hdms');
    console.log(user.name);
}
